<{include file="section/admin/header2.tpl"}>
<style type="text/css">
table.tb_notice{
    display:table;
    width:80%;
}
table.tb_notice td.notice_title{
    width:100%;
	height:40px;
	line-height:40px;
   	border-bottom:1px solid #9cb8cc;
}
table.tb_notice td.notice_line1{
    display:table-cell;
    width:90%;
    height:30px;
    line-height:30px;
   	border-bottom:1px solid #CCC;
}
table.tb_notice td.notice_line2{
    display:table-cell;
    width:10%;
    height:30px;
    line-height:30px;
   	border-bottom:1px solid #CCC;
}
table.tb_notice th{
   	border-bottom:1px solid  #ccc;
}
table.tb_notice td.notice_title strong{
    display:block;
    width:100px;
    font-size:15px;
    height:25px;
    line-height:25px;
    overflow:hidden;
}

</style>
<table class="tb_notice" cellpadding='5' cellspacing='0'>
<tr>
<td colspan='4' class="notice_title" align='left'><strong>运营公告管理</strong></td>
</tr>
<tr>
   <td class="notice_line1"  align="left" colspan="3">请选择城市：
     <select name='cityid'onchange="chg_url(this.value)">
	 <option value=0>全国</option>
	 <{foreach from=$citys item=city }>
	   <option value='<{$city.id}>' <{if $city.id == $city_id }>selected='selected'<{/if}>><{$city.name}></option>
	  <{/foreach}>
     </select>
   </td>
   <td align='center' class="notice_line2">
     <{if $notices|@count < 2 }>
	 <a href='/content/notice_add/<{$city_id}>'>添加公告</a>
	 <{/if}>
   </td>
</tr>
<tr><th width="5%" align='center'>序号</th><th width="30%" align="center">公告标题</th><th align="center" width="10%">公告时间</th><th align="center" width='10%'>操作</th></tr>
 <{foreach from=$notices item=list key=lis}>
 <tr><td align="center"><{$lis+1}></td><td align="center"><{$list.title}></td>
 <td align="center"><{php}>echo date('Y-m-d',$this->_tpl_vars['list']['time']);<{/php}></td>
 <td align="center">
   <a href="/content/notice_edit/<{$list.id}>">编辑</a> |
   <a onclick="return prompt_del();" href="/content/notice_del/<{$list.id}>">删除</a>
 </td>
</tr>
<{/foreach}>
</table>
<{include file="section/admin/footer2.tpl"}>
<script type="text/javascript">
   function prompt_del()
{
  if(confirm('您确定要删除吗？'))
  {
	 return true;
  }else{
	 return false;
  }
}
   function chg_url(city)
{
   var url = "/content/notice_lists/"+city;
   window.location = url;
}
</script>
